<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <title>Demo - Tabs In Overlay</title>
    <link href="../../../css/assets/dpl/base.css" rel="stylesheet"/>
    <link href="../../../css/demo/dpl/assets/docs.css" rel="stylesheet"/>
    <link href="../../../button/assets/dpl.css" rel="stylesheet"/>
    <link href="../../assets/dpl.css" rel="stylesheet"/>
    <link href="../../../overlay/assets/dpl.css" rel="stylesheet"/>
</head>
<body>

<div style="width: 900px;margin: 50px auto;">
    <button id='show' class="ks-button">show</button>
</div>

<script src="/kissy/build/seed-debug.js"></script>
<script src="/kissy/src/package.js"></script>
<script>
    KISSY.use("overlay,tabs,node", function (S, Overlay, Tabs,$) {

        (function () {

            var o = new Overlay.Dialog({
                headerContent: 'Tabs in Overlay',
                elStyle:{
                  backgroundColor:'white'
                },
                closable:true,
                mask:{
                  closeOnClick:true
                },
                width: 500,
                align: {
                    node: null,
                    points: ['cc', 'cc']
                },
                children:[
                    {
                        xclass:'tabs',
                        barOrientation: Tabs.Orientation.BOTTOM,
                        items: [
                            {
                                title: 'tab-1',
                                selected: true,
                                content: '<p>panel-1</p>'
                            },
                            {
                                title: 'tab-2',
                                content: '<p>panel-2</p>'
                            }
                        ]
                    }
                ]
            });

            $('#show').on('click', function () {
                o.show();
            });

        })();

    });
</script>
</body>
</html>